<div class="body" 
[matTooltip]="data.desc"  
[matTooltipDisabled]="ctx.isOpen()"
 #ctx="cdkContextMenuTriggerFor" 
 [cdkContextMenuTriggerFor]="item_menu" 
(dblclick)="open()"
 >
    <img src="{{data.iconUrl}}" class="icon" />
    <div  class="item-name" >{{data.name}}</div> 
    <mat-tooltip-component *ngIf="data.desc"  >{{data.desc}}</mat-tooltip-component>
    </div>

   
<ng-template #item_menu>
  <div class="menu" cdkMenu> 
    <button class="menu-item"  cdkMenuItem *ngIf="open_op" (click)="open()">打开</button>
    <!-- <button class="menu-item"  cdkMenuItem [cdkMenuTriggerFor]="open_way"> 打开方式 <span>&#10148;</span></button> -->

    <button class="menu-item"  cdkMenuItem *ngIf="data.type=='folder'"  (click)="onCreateFolder.emit(data)"  >新建文件夹</button>
    <button class="menu-item"  cdkMenuItem *ngIf="data.type=='folder'"  [cdkMenuTriggerFor]="new_doc">新建文件<span>&#10148;</span></button> 
      <button class="menu-item"  cdkMenuItem (click)="copy()" >复制</button>
      <button class="menu-item"  cdkMenuItem (click)="shear()" >剪切</button>
    <button class="menu-item"  cdkMenuItem (click)="rename()" >重命名</button>
    <button class="menu-item"  cdkMenuItem (click)="onRemove.emit(data)" >删除</button> 
    <button class="menu-item"  cdkMenuItem  *ngFor="let item of ext_operations_current" (click)="ext_operation_execute(item)" >{{item.name}}</button>
  </div>
</ng-template>

<ng-template #open_way>
  <div class="menu" cdkMenu>
    <button class="menu-item"  cdkMenuItem>Document</button>
    <button class="menu-item"  cdkMenuItem>From template</button>
    <button class="menu-item"  cdkMenuItem>Spreadsheet</button>
    <button class="menu-item"  cdkMenuItem>Presentation</button>
    <button class="menu-item"  cdkMenuItem>Form</button>
  </div>
</ng-template>

<ng-template #new_doc>
  <div class="menu" cdkMenu>
    <button class="menu-item"  cdkMenuItem  *ngFor="let item of createFile_templates" (click)="onCreateFile.emit(item)" >{{item.name}}</button> 
  </div>
</ng-template>